<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
<table class="tab-list shield-table-odd">
	<colgroup>
		<col width="">
		<col width="30%">
	</colgroup>
    <tr>
        <th class="w50 taCenter">序号</th>
        <th>书籍</th>
        <th>作者</th>
        <th>购买日期</th>
        <th>借阅状态</th>
	    <th>当前借阅人</th>
        <th class="operate_icon">操作</th>
    </tr>
<c:forEach var="model" items="${pageBean.resultList }" varStatus="var">
    <tr>
        <td style="text-align: center;">${(pageBean.currentPage -1)*pageBean.pageSize+var.count }</td>
        <td title="${model.bookName }">
        	<!-- imgPreview_plugin鼠标悬停放大 -->
        	<img src="${model.imgPath }" height="30" class="imgPreview_plugin" style="cursor: pointer;"/>
        	${model.bookName }
        </td>
        <td >${model.author }</td>
        <td ><fmt:formatDate value="${model.buyDate }" pattern="yyyy年MM月dd日"/></td>
	   	<td >
	   	<!-- 自定义标签，输出枚举值，=连接键值对 |连接不同组 -->
	   	<shield:switchOput data="0=可借阅|1=已借阅|2=其他" value="${model.borrowState }"></shield:switchOput>
	   	</td>
	   	<td ><c:if test="${model.borrowState == 1}">${model.borrowerName }</c:if></td>
	
        <td>
        	<!-- href改为data-url -->
            <a data-url="${ctxPathA }/oa/booksmanage/show" shieldParams="{'id':'${model.id }'}" class="shieldDialog shield-icon show" viewTitle="书籍信息" title="查看书籍信息"
               viewWidth="600"></a>
            <a data-url="${ctxPathA }/oa/booksmanage/borrowrecord/show" shieldParams="{'bid':'${model.id }'}" class="shieldDialog shield-icon show" viewTitle="书籍借阅记录" title="书籍借阅记录"
               viewWidth="600"><img src="${ctxPath }/images/icon/application_cascade.png" /></a>
               
            <a data-url="${ctxPathA }/oa/booksmanage/toAddOrUpdate" shieldParams="{'id':'${model.id }'}"  class="shieldDialog shield-icon update" viewTitle="修改书籍信息" title="修改书籍信息"
               viewWidth="600"></a>
            <a data-url="${ctxPathA }/oa/booksmanage/del" shieldParams="{'id':'${model.id }'}"  class="shieldAjax shield-icon del" viewTitle="确定要删除该条记录吗?"></a>
        </td>
    </tr>
</c:forEach>
<c:if test="${empty pageBean.resultList }">
    <!-- 无数据时展示，有数据时展示上面的列表 -->
    <tr class="nodatatr_plugin">
        <td colspan="6" class="taCenter">暂无数据</td>
    </tr>
</c:if>
</table>
</shield:permssion>
<%@include file="/WEB-INF/view/a/include/pagination.jsp"%>